#include "main_menu.h"
#include "iconhelper.h"

MainMenu::MainMenu(QWidget *parent):QMenu(parent)
{
    this->createActions();
}

void MainMenu::createActions()
{
    action_help=new QAction(this);
    action_aboutus=new QAction(this);
    action_dice=new QAction(this);

    this->addAction(action_help);
    this->addAction(action_aboutus);
    this->addAction(action_dice);

    action_help->setText(tr("帮助"));
    action_aboutus->setText(tr("关于"));
    action_dice->setText(tr("掷骰子"));

    connect(action_help,SIGNAL(triggered(bool)),this,SIGNAL(showHelp()));
    connect(action_aboutus,SIGNAL(triggered(bool)),this,SIGNAL(showAboutus()));
    connect(action_dice,SIGNAL(triggered(bool)),this,SIGNAL(showDice()));
}
